import App from './App'
import store from "@/store";

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App,
  store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif

// uView引用
import uView from "@/uni_modules/uview-ui";
Vue.use(uView);
uni.$u.config.unit = 'rpx'


// 小程序胶囊按钮
// #ifdef MP-WEIXIN
Vue.prototype.getMenuButton = function (){
	return uni.getMenuButtonBoundingClientRect()
}
// #endif

import moment from 'moment'
moment.locale('zh-cn')
Vue.prototype.$moment = moment
 
// 二次封装uni常用方法
import * as myUni from '@/utils/uni-api.js'
Vue.prototype.$myUni = myUni

// 过滤器
import filters from '@/filters/common.js'
Object.keys(filters).forEach(item => {
	Vue.filter(item, filters[item])
})

// 全局组件
import OnePicker from '@/components/OnePicker/index.vue'
import Modal from '@/components/Modal/index.vue'
Vue.component('OnePicker', OnePicker);
Vue.component('Modal', Modal)

